#include <iostream>
#define N 100

using namespace std;

void readintVector(int array[], int elements){
for (int i=0; i<elements; i++){
	cout<<"a["<<i<<"]=";
	cin>>array[i];
	cout<<"\n";}
}

int is_sequence(int array[],int elements)
{
int i;
int diff;
diff=array[1]-array[0];
for (i=2; i<elements; i++)
	if ((array[i]-array[i-1])!=diff)
		return 0;
return 1;
}

int main(){
int array[N];
int elements;
cout<<"Type the number of elements you want in the array: ";
cin>>elements;
readintVector(array, elements);

cout<<"The array: ";
for(int i=0; i<elements; i++){
	cout<<array[i]<<" ";}
cout<<endl;

if(is_sequence(array, elements))
cout<<"is a sequence. \n";
else
cout<<" is not a sequence. \n";
		
return 0;
}
